<template>
  <div>
    <h2>AppChild4.vue</h2>
  </div>
</template>
<script setup>
import { onMounted,onBeforeUnmount } from 'vue';
import bus from "../assets/bus.js"
// 向兄弟组件传参
onMounted(() => {
  bus.on('appchild4', (e) => {
    console.log('接收的appchild4', e)
  });
  bus.on("*", (type, e) => {
    console.log('接收的*',type, e)
  })
})
onBeforeUnmount(() => {
  bus.all.clear();
})
</script>
<style lang="scss" scoped></style>